package
{
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	import flash.filters.GlowFilter;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;

	public class Config
	{
		public var baseStoreWidth:int = 3;
		public var stores:Array = new Array();
		public var startingCash:int = 100;
		public var baseStock:int = 5;
		public var restockTime:int = 45000;
		public var expansionCostUnit:int = 25;
		public function Config()
		{
			stores.push(storeConfig('tools','Tools', 50, (0x777777/2 + Math.random()*0x777777)));
			stores.push(storeConfig('clothes','Clothes', 50, (0x777777/2 + Math.random()*0x777777)));
			stores.push(storeConfig('pets','Pets', 100, (0x777777/2 + Math.random()*0x777777)));
			stores.push(storeConfig('burgers','Burgers', 150, (0x777777/2 + Math.random()*0x777777)));
		}
		
		
		public function getStore(name:String):Object{
			var i:int, l:int;
			for(i = 0, l = stores.length; i < l; i++){
				if(stores[i].name == name){
					return stores[i];
				}
			}
			
			throw new Error("Invalid store config");
		}
		
		public function storeConfig(name:String, displayName:String, value:int, color:uint):Object{
			var config:Object = new Object();
			config['name'] = name;
			config['displayName'] = displayName;
			config['value'] = value;
			config['color'] = color;

			
			return config;
		}
	}
}